import request from './request'

//登录
export function loginSys(params?: any) {
    return request(`api/sysUser/login`, 'POST', params || {})
}

//退出登录
export function logOut(params?: any) {
    return request(`api/sysUser/quitLogin`, 'GET', params || {})
}

//修改密码
export function updatePassword(params?: any) {
    return request(`api/sysUser/updatePassword`, 'POST', params || {})
}

//重置密码
export function resetPassword(params?: any) {
    return request(`api/sysUser/resetPassword`, 'GET', params || {})
}


//订单查询
export function getOrders(params?: any) {
    return request(`api/orderGoods/page`, 'GET', params || {})
}

//根据id删除订单
export function deleteById(params?: any) {
    return request(`api/orderGoods/deleteById`, 'GET', params || {})
}

//根据id修改订单
export function updateById(params?: any) {
    return request(`api/orderGoods/update`, 'POST', params || {})
}

//设备分类列表
export function allKind(params?: any) {
    return request(`api/orderGoods/allKind`, 'GET', params || {})
}
//查询月需求计划
export function getNeedPlan(params?: any) {
    return request(`api/needPlan/page`, 'GET', params || {})
}

//根据id删除月需求计划
export function deleteMonth(params?: any) {
    return request(`api/needPlan/deleteById`, 'GET', params || {})
}

//添加月需求计划
export function addMonth(params?: any) {
    return request(`api/needPlan/add`, 'POST', params || {})
}

//月需求计划详情
export function viewMonth(params?: any) {
    return request(`api/needPlan/selectById`, 'GET', params || {})
}

//月需求计划编辑
export function updateMonth(params?: any) {
    return request(`api/needPlan/update`, 'POST', params || {})
}

//角色下拉数据
export function roleList(params?: any) {
    return request(`api/sysUser/roleList`, 'GET', params || {})
}

//获取用户列表
export function getUsers(params?: any) {
    return request(`api/sysUser/page`, 'GET', params || {})
}

//根据id查询用户信息
export function getUserById(params?: any) {
    return request(`api/sysUser/selectById`, 'GET', params || {})
}
//根据id删除用户
export function deleteUser(params?: any) {
    return request(`api/sysUser/delete`, 'GET', params || {})
}

//新增用户
export function addUser(params?: any) {
    return request(`api/sysUser/register`, 'POST', params || {})
}

//修改用户
export function editUser(params?: any) {
    return request(`api/sysUser/update`, 'POST', params || {})
}



//生成配送方案
export function getScheme(params?: any) {
    return request(`api/marketShar/scheme`, 'POST', params || {})
}
//未确认方案生成
export function getScheme2(params?: any) {
    return request(`api/marketShar/unconfirmedScheme`, 'POST', params || {})
}

//配送方案导出
export function marketShar(params?: any) {
    return request(`api/marketShar/import`, 'POST', params || {})
}

//全部地点经纬度
export function getPlaceAll(params?: any) {
    return request(`api/marketShar/placeAll`, 'GET', params || {})
}


//基础配置
export function placeSort(params?: any) {
    return request(`api/placeSort/page`, 'GET', params || {})
}

//站点信息
export function matePlace(params?: any) {
    return request(`api/matePlace/page`, 'GET', params || {})
}

//修改优先级
export function updatePri(params?: any) {
    return request(`api/placeSort/update`, 'POST', params || {})
}

//获取轮训标识
export function getRouteFlag(params?: any) {
    return request(`api/marketShar/getRouteFlag`, 'GET', params || {})
}

//分页查询路线
export function placeRoute(params?: any) {
    return request(`api/placeRoute/page`, 'GET', params || {})
}
//分页查询需求地点
export function placeNeedDetail(params?: any) {
    return request(`api/placeNeedDetail/page`, 'GET', params || {})
}

//确认路线
export function affirmByIds(params?: any) {
    return request(`api/placeRoute/affirmByIds`, 'GET', params || {})
}

//查询剩余种类详细
export function getNeedDetail(params?: any) {
    return request(`api/placeNeedDetail/getNeedDetail`, 'GET', params || {})
}

//合并路线
export function mergeRoute(params?: any) {
    return request(`api/placeRoute/mergeRoute`, 'POST', params || {})
}
//余量列表
export function amountList(params?: any) {
    return request(`api/routeDetail/page`, 'GET', params || {})
}
//修改路线订单明细
export function updateRouteByPlan(params?: any) {
    return request(`api/routeDetail/updateRouteByPlan`, 'POST', params || {})
}
//批量勾选订单余量
export function printUseFlagById(params?: any) {
    return request(`api/routeDetail/printUseFlagById`, 'GET', params || {})
}